package client_cmd;

import java.io.IOException;

import client_entity.Graph;

public class Twitt_Graphs extends Twitt_News{
	private static final int ESTABLISH_ALBUN = 8; 
	private	static final int TWITT_GRAPH = 9;
	
	private Graph graph;
	
	public Graph getGraph() {
		return graph;
	}

	public void setGraph(Graph graph) {
		this.graph = graph;
	}

	public boolean establish_album(String al_name)
	{
		Graph temp = new Graph(0);
		temp.setAlbum(al_name);
		temp.setOwner(graph.getOwner());
		try {
			connector.send(ESTABLISH_ALBUN,temp);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}
		return (Boolean) connector.recieve();
	}
	
	public boolean twitt_graph()
	{
		try {
			connector.send(TWITT_GRAPH,graph);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}
		return (Boolean) connector.recieve();
	}
	
	
}
